import cPickle as p

shopList = ['apple','mango','carrot']

f = file('shopListMemo.txt','w')
p.dump(shopList,f)
f.close()

del shopList

f = file('shopListMemo.txt')
storedlist = p.load(f)
print storedlist